package com.pkk.penguin.uti.oss.config;

import com.qcloud.cos.COSClient;
import com.qcloud.cos.ClientConfig;
import com.qcloud.cos.auth.BasicCOSCredentials;
import com.qcloud.cos.auth.COSCredentials;
import com.qcloud.cos.region.Region;

/**
 * @description:
 * @author: peikunkun
 * @create: 2019-11-08 11:58
 **/
public class OssClientConfig {

  // 1 初始化用户身份信息(secretId, secretKey)
  static COSCredentials cred = new BasicCOSCredentials(OssConfig.SECRETID, OssConfig.SECRETKEY);
  // 2 设置bucket的区域, COS地域的简称请参照 https://cloud.tencent.com/document/product/436/6224
  static ClientConfig clientConfig = new ClientConfig(new Region(OssConfig.REGIONNAME));
  // 3 生成cos客户端
  public static COSClient cosclient = new COSClient(cred, clientConfig);
}
